// app.js
var util = require('./public/commont.js') //引入公共方法

App({
  // 公共js
  publicFun: {
    isPhone: util.isPhone, // 手机号验证
    isNull: util.isNull, // 空格 空
    throttle: util.throttle, //防连击
    navBarHeightinfo: util.navBarHeightinfo, //获取状态栏高度
  },
  // 公共js

  onLaunch() {
    wx.getSystemInfo({
      success: res => {
        this.globalData.system = res
      }
    })
      // 获取胶囊信息
    this.globalData.capsule = wx.getMenuButtonBoundingClientRect()
    console.log(this.globalData,'ttttt')
    // 登录
    wx.login({
      success: res => {
        this.globalData.code = res.code;
      }
    })
    
  },
  globalData: {
    imgUrl: 'http://www.6laoyou.com/api/files/22/12/02/',
    wxImgUrl: 'cloud://cloud1-8gdis8d75745ce14.636c-cloud1-8gdis8d75745ce14-1315949690/',
    userInfo: null,
    code: '',
    system: {},
    capsule: ''
  }
})